loader/i386/linux: Cast left shift to grub_uint32_t
authorAlec Brown <alec.r.brown@oracle.com>
Fri, 7 Feb 2025 01:47:57 +0000 (01:47 +0000)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commitb20693bc586788a2807f9f241edbf53e647b5071
treed5c4d88ac37148023ef91ed9fbce5db24d1a86e9
parented843f7be5ff24b591fb5240912ce9465951c489
loader/i386/linux: Cast left shift to grub_uint32_t

The Coverity complains that we might overflow into a negative value when
setting linux_params.kernel_alignment to (1 << align). We can remedy
this by casting it to grub_uint32_t.

Fixes: CID 473876
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name loader-i386-linux-Cast-left-shift-to-grub_uint32_t.patch
grub-core/loader/i386/linux.c